package com.ruirui.demo;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public class FluxLog {
    public static void main(String[] args) throws InterruptedException {
        /**
         * 创建
         * 转换 成二倍元素
         * 添加log
         * 订阅
         */
        Flux<Integer> flux = Flux.just(1, 2, 3, 4, 5);
        flux.map(e -> e * 2).log().subscribe();
        Thread.sleep(5000);
    }
}
